Skip to content

Pinned frames: anchor a set to the raid/party frames#185

Open
Krathe82 wants to merge 1 commit into
DanderBot:mainfrom
Krathe82:krathe/pinned-anchor-to-frames
Open

Pinned frames: anchor a set to the raid/party frames#185
Krathe82 wants to merge 1 commit into
DanderBot:mainfrom
Krathe82:krathe/pinned-anchor-to-frames

Conversation

@Krathe82

Copy link
Copy Markdown
Contributor

What

Pinned sets could only be placed freely on screen, so they drifted out of alignment whenever the raid/party frames moved, resized, or re-centred on a roster change. This adds an Anchor To Frames option to the pinned position panel so a set can pin to the raid/party frames and stay aligned with them.

How to use

Unlock your frames and click a pinned set's drag handle → the position panel gains an Anchor To Raid Frames / Anchor To Party Frames dropdown (named for the set's mode). Pick a corner — Top Left, Top, Top Right, Left, Center, Right, Bottom Left, Bottom, Bottom Right — and the set pins to that corner of the frames container; the X / Y nudge becomes a fine offset from there. Screen (Free) (default) keeps the existing free placement.

Changes

  • set.position.anchorTo (default SCREEN = current UIParent placement). FRAMES_* values glue the set's growth corner to that corner of the mode's frames container, X/Y as a fine offset. It's a static SetPoint, so the set tracks the frames automatically — across roster changes, the centre-alignment shift, and in combat (no per-frame repositioning).
  • PositionPinnedContainer resolves the raid vs party container (the test variant while test mode is active, so the preview matches what's on screen) and falls back to screen if the target doesn't exist. anchorTo is preserved through both the live and test drag handlers and mirrored to _realRaidDB so raid-set auto-layout overlays keep it.
  • Position panel: a pinned-only dropdown in its own band (the panel grows in pinned mode). Switching anchor mode resets the offset to 0 so the set lands exactly at the chosen reference, rather than being flung off-screen by an offset that meant something different in the other mode.

Notes

  • No behaviour change for existing sets — anchorTo defaults to SCREEN (no migration needed).
  • Anchors to the container's bounding box (stable regardless of roster size).
  • Works in test mode (anchors to the test container so the preview is accurate).

Pinned sets could only be placed freely on the screen, so they drifted out of
alignment whenever the raid/party frames moved, resized, or re-centred on a
roster change. Add an "Anchor To Frames" option to the pinned position panel.

- set.position.anchorTo (default SCREEN = existing UIParent placement). FRAMES_*
  values glue the set's growth corner to that corner of the mode's frames
  container, with X/Y as a fine offset; the static SetPoint means the set tracks
  the frames automatically (incl. in combat — no per-frame reposition).
- PositionPinnedContainer resolves the raid/party container (test variant while
  test mode is active, matching what's on screen) and falls back to screen if it
  doesn't exist. anchorTo is preserved through both drag handlers and mirrored to
  _realRaidDB so raid-set auto-layout overlays keep it.
- Position panel: a pinned-only "Anchor To Raid/Party Frames" dropdown (9 corners
  + Screen). Switching anchor mode resets the offset to 0 so the set lands at the
  chosen reference instead of being flung off-screen by an offset that meant
  something different in the other mode. Panel grows in pinned mode to give the
  dropdown its own band.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant